package main

import (
	cat "go_final/demos/gin_returns_protobuf/protofile"
	"net/http"

	"github.com/gin-gonic/gin"
)

func main() {
	r := gin.Default()
	r.GET("/protobuf", func(c *gin.Context) {
		kitty := cat.Cat{
			Name:   "Lucky",
			Gender: cat.Gender_GenderMale,
		}

		c.ProtoBuf(http.StatusOK, &kitty)
	})
	r.Run()
}
